/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Administrator
 * Date: 2023-06-29
 * Time: 22:49
 */

class Dog{
    public String name;
    public int age;

    public Dog(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public void eat(){
        System.out.println(name+"吃东西");
    }
    public void dogage(){
        System.out.println(name+age+"岁了");
    }
}
public class Test3 {
    public static void main(String[] args) {
        Dog dog1 = new Dog("小花",2);
        Dog dog2 = new Dog("小黑",3);
        Dog dog3 = new Dog("大黄",4);
        dog1.eat();
        dog2.eat();
        dog3.eat();
        dog1.dogage();
        dog2.dogage();
        dog3.dogage();
    }
}
